home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 119
/
(Vol 119) Nov 09 2010.iso
/
Games
/
soccer_skill.swf
/
scripts
/
frame_122
/
DoAction.as
Wrap
Text File
|
2010-11-09
|
1KB
|
85 lines
t = Number(t) + 0.1;
oldx = x;
oldy = y;
x = getProperty("Ball", _X);
y = getProperty("Ball", _Y);
vy = Number(vy) + Number(g / 10);
x = Number(x) + Number(vx / 10);
y = Number(y) + Number(vy / 10);
if(Number(280 - BallRadius) < Number(y))
{
y = 280 - BallRadius;
vx *= elastic;
vy = (- vy) * elastic;
if(mejorpuntaje > 0 && puntos > 0)
{
tellTarget("boo")
{
play();
}
}
if(mejorpuntaje < puntos)
{
mejorpuntaje = puntos;
}
puntos = 0;
random = random(2);
}
if(Number(x) < Number(BallRadius))
{
x = BallRadius;
vx = (- vx) * elastic;
vy *= elastic;
}
if(Number(400 - BallRadius) < Number(x))
{
x = 400 - BallRadius;
vx = (- vx) * elastic;
vy *= elastic;
}
setProperty("Ball", _X, x);
setProperty("Ball", _Y, y);
setProperty("sombra", _X, x);
setProperty("diego", _X, x);
setProperty("Ball.bola", _rotation, x);
if(y < 230)
{
setProperty(diego.diegohead, _rotation, (y * -1 + 240) / 2.5);
}
frame = int(y);
tellTarget("sombra")
{
gotoAndStop(eval("../:frame"));
}
if(puntos == 1)
{
tellTarget("ova")
{
play();
}
}
if(puntos == 5)
{
if(random == "0")
{
tellTarget("ole")
{
play();
}
}
else if(random == "1")
{
tellTarget("veni")
{
play();
}
}
if(puntos == 15)
{
tellTarget("pele")
{
play();
}
}
}